/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package DsrvMain.persistence.entities;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author a381u296
 */
@Entity
@Table(name = "t001_user")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "T001User.findAll", query = "SELECT t FROM T001User t"),
    @NamedQuery(name = "T001User.findById", query = "SELECT t FROM T001User t WHERE t.id = :id"),
    @NamedQuery(name = "T001User.findByUsername", query = "SELECT t FROM T001User t WHERE t.username = :username"),
    @NamedQuery(name = "T001User.findByPassword", query = "SELECT t FROM T001User t WHERE t.password = :password"),
    @NamedQuery(name = "T001User.findBySurname", query = "SELECT t FROM T001User t WHERE t.surname = :surname"),
    @NamedQuery(name = "T001User.findByName", query = "SELECT t FROM T001User t WHERE t.name = :name"),
    @NamedQuery(name = "T001User.findByFatherName", query = "SELECT t FROM T001User t WHERE t.fatherName = :fatherName"),
    @NamedQuery(name = "T001User.findByDateOfBirth", query = "SELECT t FROM T001User t WHERE t.dateOfBirth = :dateOfBirth"),
    @NamedQuery(name = "T001User.findByTaxCode", query = "SELECT t FROM T001User t WHERE t.taxCode = :taxCode"),
    @NamedQuery(name = "T001User.findByPhone", query = "SELECT t FROM T001User t WHERE t.phone = :phone"),
    @NamedQuery(name = "T001User.findByEmail", query = "SELECT t FROM T001User t WHERE t.email = :email"),
    @NamedQuery(name = "T001User.findByAddress", query = "SELECT t FROM T001User t WHERE t.address = :address"),
    @NamedQuery(name = "T001User.findByCity", query = "SELECT t FROM T001User t WHERE t.city = :city"),
    @NamedQuery(name = "T001User.findByPostalCode", query = "SELECT t FROM T001User t WHERE t.postalCode = :postalCode"),
    @NamedQuery(name = "T001User.findByReceiveEmail", query = "SELECT t FROM T001User t WHERE t.receiveEmail = :receiveEmail")})
public class T001User implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "ID")
    private Long id;
    @Basic(optional = false)
    @Column(name = "USERNAME")
    private String username;
    @Basic(optional = false)
    @Column(name = "PASSWORD")
    private String password;
    @Basic(optional = false)
    @Column(name = "SURNAME")
    private String surname;
    @Column(name = "NAME")
    private String name;
    @Column(name = "FATHER_NAME")
    private String fatherName;
    @Column(name = "DATE_OF_BIRTH")
    @Temporal(TemporalType.DATE)
    private Date dateOfBirth;
    @Basic(optional = false)
    @Column(name = "TAX_CODE")
    private String taxCode;
    @Basic(optional = false)
    @Column(name = "PHONE")
    private String phone;
    @Basic(optional = false)
    @Column(name = "EMAIL")
    private String email;
    @Basic(optional = false)
    @Column(name = "ADDRESS")
    private String address;
    @Basic(optional = false)
    @Column(name = "CITY")
    private String city;
    @Basic(optional = false)
    @Column(name = "POSTAL_CODE")
    private String postalCode;
    @Column(name = "RECEIVE_EMAIL")
    private Boolean receiveEmail;

    public T001User() {
    }

    public T001User(Long id) {
        this.id = id;
    }

    public T001User(Long id, String username, String password, String surname, String taxCode, String phone, String email, String address, String city, String postalCode) {
        this.id = id;
        this.username = username;
        this.password = password;
        this.surname = surname;
        this.taxCode = taxCode;
        this.phone = phone;
        this.email = email;
        this.address = address;
        this.city = city;
        this.postalCode = postalCode;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getSurname() {
        return surname;
    }

    public void setSurname(String surname) {
        this.surname = surname;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getFatherName() {
        return fatherName;
    }

    public void setFatherName(String fatherName) {
        this.fatherName = fatherName;
    }

    public Date getDateOfBirth() {
        return dateOfBirth;
    }

    public void setDateOfBirth(Date dateOfBirth) {
        this.dateOfBirth = dateOfBirth;
    }

    public String getTaxCode() {
        return taxCode;
    }

    public void setTaxCode(String taxCode) {
        this.taxCode = taxCode;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getPostalCode() {
        return postalCode;
    }

    public void setPostalCode(String postalCode) {
        this.postalCode = postalCode;
    }

    public Boolean getReceiveEmail() {
        return receiveEmail;
    }

    public void setReceiveEmail(Boolean receiveEmail) {
        this.receiveEmail = receiveEmail;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof T001User)) {
            return false;
        }
        T001User other = (T001User) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "DsrvMain.persistence.entities.T001User[ id=" + id + " ]";
    }
    
}
